Sanitizing csv batch items to use bool False instead of string False#111
Sanitizing csv batch items to use bool False instead of string False#111sgruber-seibert wants to merge 1 commit intomainfrom
Conversation
|
I am not whether we like this to have. This converts Strings to Bool without asking, changing the behaviour of conditions. This might be intentional in most cases, but if someone relies on "whatever is the output, it becomes true", this could break the logic. If you have Inputs like this, I see two possible ways to handle this:
|
|
While i would find this: |
If we introduce this syntax should we only add this to the vars-file or also to the --vars option ? |
I would say: string is the default and all variables are processed this way, whereever they come from. It could be a "hard" match, where the options are hardcoded. Alternatively it could be flexible and you just write the casting funktion there which is executed. This would be very powerful, but has also some risks. |
I don't think it's too complex. But there might be some little obstractles when we go in there in detail, especially to ensure, that only and exact that is converted, what you intend. |
Sanitizing input values when using batch processing
"False" to False